package com.lanou.domain;

import java.util.HashSet;
import java.util.Set;

/**
 * 职务
 */
public class CrmPost {
    private String postId;
    private String postName;

    //职务和员工关系  一对多
    private Set<CrmStaff> staffSet=new HashSet<>();

    //职务和部门关系  多对一
    private CrmDepartment department;

    public Set<CrmStaff> getStaffSet() {
        return staffSet;
    }

    public void setStaffSet(Set<CrmStaff> staffSet) {
        this.staffSet = staffSet;
    }

    public CrmDepartment getDepartment() {
        return department;
    }

    public void setDepartment(CrmDepartment department) {
        this.department = department;
    }

    public String getPostId() {
        return postId;
    }

    public void setPostId(String postId) {
        this.postId = postId;
    }

    public String getPostName() {
        return postName;
    }

    public void setPostName(String postName) {
        this.postName = postName;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        CrmPost crmPost = (CrmPost) o;

        if (postId != null ? !postId.equals(crmPost.postId) : crmPost.postId != null) return false;
        if (postName != null ? !postName.equals(crmPost.postName) : crmPost.postName != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = postId != null ? postId.hashCode() : 0;
        result = 31 * result + (postName != null ? postName.hashCode() : 0);
        return result;
    }
}
